<?php
/**
 * Index schema representation
 * @author Artur Kmera <artur.kmera@3code.pl>
 * @version 0.9
 * @package ORM
 * @subpackage Schema
 * @link http://arrowplatform.org/orm
 * @copyright 2011 Arrowplatform 
 * @license GNU LGPL
 * @todo implement
*/
class Index implements ISchemaElement{
	
	/**
	 * Index name
	 * @var String
	 */
	public $name;
	
	/**
	 * Index type
	 * @var String
	 */
	public $type;
	
	/**
	 * Index fields
	 * @var Field []
	 */
	public $fields = array();
	
	/**
	 * (non-PHPdoc)
	 * @see ISchemaElement::toString()
	 */
	public function toString(){
		return "Type: Index, Name: {$this->name}";
	}
	
	/**
	 * (non-PHPdoc)
	 * @see ISchemaElement::toArray()
	 */
	public function toArray(){
	
		return array(
			"name" => $this->name
		);
	}
}
?>